package com.easylinkin.linkappapi.space.entity;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.util.Date;
import java.util.List;
import java.util.Set;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

/**
 * <p>
 * 空间
 * </p>
 *
 * @author liuming
 * @since 2020-04-14
 */
@TableName("linkapp_area")
@Data
@ApiModel("区域实体类")
public class LinkappArea extends Model<LinkappArea> {

    @TableId
    @Length(max = 32, message = "id 超长")
    @ApiModelProperty(value = "主键ID", required = false, example = "")
    private String id;

    @TableField("space_id")
    @Length(max = 32)
    @ApiModelProperty(value = "空间ID", required = false, example = "")
    private String spaceId;

    @TableField("area_name")
    @Length(max = 50)
    @ApiModelProperty(value = "区域名称", required = false, example = "")
    private String areaName;

    @TableField("area_no")
    @Length(max = 50)
    @ApiModelProperty(value = "区域编号", required = false, example = "")
    private String areaNo;

    @TableField("sort_no")
    @ApiModelProperty(value = "排序号", required = false, example = "0")
    private Integer sortNo;

    /**
     * 1是室内 2是室外
     */
    @TableField("type")
    @ApiModelProperty(value = "是否室内", required = false, example = "1")
    private Integer type;

    @TableField("level")
    @ApiModelProperty(value = "层级", required = false, example = "1")
    private Integer level;

    /**
     * 删除状态 0-已删除,1-有效
     */
    @TableLogic(value = "1", delval = "0")
    @TableField("status")
    @ApiModelProperty(value = "删除状态", required = false, example = "")
    private String status;

    @TableField("longitude")
    @ApiModelProperty(value = "经度", required = false, example = "")
    private String longitude;

    @TableField("latitude")
    @ApiModelProperty(value = "纬度", required = false, example = "")
    private String latitude;

    @TableField("img")
    @ApiModelProperty(value = "img", required = false, example = "")
    private String img;

    @TableField("remark")
    @ApiModelProperty(value = "备注", required = false, example = "")
    private String remark;

    @TableField("parent_id")
    @ApiModelProperty(value = "父区域ID", required = false, example = "")
    private String parentId;

    /**
     * 安装详情
     */
    @TableField("site")
    @ApiModelProperty(value = "安装详情", required = false, example = "")
    private String site;

    /**
     * 区域位置
     */
    @TableField("area_path")
    @ApiModelProperty(value = "区域位置", required = false, example = "")
    private String areaPath;

    /**
     * 地图范围
     */
    @TableField("map_polygon_path")
    @ApiModelProperty(value = "地图范围", required = false, example = "")
    private String mapPolygonPath;

    @TableField(exist = false)
    @ApiModelProperty(value = "节点类型", required = false, example = "")
    private String nodeType;

    @TableField(exist = false)
    @ApiModelProperty(value = "空间ID集合", required = false, example = "")
    private List<String> spaceIds;

    @TableField("create_time")
    @ApiModelProperty(value = "创建时间", required = false, example = "")
    private Date createTime;

    @TableField("creator")
    @ApiModelProperty(value = "创建人", required = false, example = "")
    private String creator;

    @TableField("modify_time")
    @ApiModelProperty(value = "修改时间", required = false, example = "")
    private Date modifyTime;

    @TableField("modifier")
    @ApiModelProperty(value = "修改人", required = false, example = "")
    private String modifier;

    @TableField("tenant_id")
    @ApiModelProperty(value = "租户ID", required = false, example = "")
    private String tenantId;

    @TableField(exist = false)
    @ApiModelProperty(value = "空间名称", required = false, example = "")
    private String spaceName;

    @TableField(exist = false)
    @ApiModelProperty(value = "空间编号", required = false, example = "")
    private String spaceNo;

    @TableField(exist = false)
    @ApiModelProperty(value = "父名称", required = false, example = "")
    private String parentName;

    @TableField(exist = false)
    @ApiModelProperty(value = "父编号", required = false, example = "")
    private String parentNo;

    @TableField(exist = false)
    @ApiModelProperty(value = "区域路径集合", required = false, example = "")
    private List<String> areaPaths;

    @TableField(exist = false)
    @ApiModelProperty(value = "ID集合", required = false, example = "")
    private Set<String> ids;

}
